package com.clkj.cldisabledmanclient.mvp.myaction;

import android.os.Bundle;
import android.webkit.WebView;
import android.widget.TextView;

import com.clkj.cldisabledmanclient.R;
import com.clkj.cldisabledmanclient.base.BaseActivity;
import com.clkj.cldisabledmanclient.bean.MyActionBean;
import com.clkj.cldisabledmanclient.http.HttpConfig;
import com.clkj.cldisabledmanclient.util.CommonUtil;

public class MyActionDetailActivity extends BaseActivity {

    private TextView tvName;
    private WebView wvContent;

    private MyActionBean myActionBean;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_action_detail);
        initView();
        initData();
        assignView();
    }

    @Override
    public void initData() {

        myActionBean = (MyActionBean) getIntent().getSerializableExtra("myActionBean");
    }

    @Override
    public void assignView() {

        tvName.setText(myActionBean.getInformationTitle());

        CommonUtil.initWebView(wvContent);
        wvContent.loadDataWithBaseURL(HttpConfig.URL_OF_INTERFACE_BASE,myActionBean.getInformationContent(),"text/html; charset=UTF-8",null,null);
    }

    @Override
    public void initView() {

        tvName = (TextView) findViewById(R.id.tv_Name);
        wvContent = (WebView) findViewById(R.id.wv_content);
    }
}
